import request from '@/utils/request'
// 获取-部门列表
export const companyDepartmentRequest = () => {
  return request.get('/company/department')
}
// 获取-部门负责人列表
export const usrSimpleRequest = () => {
  return request.get('/sys/user/simple')
}
// 新增部门
export const addDepartmentRequest = ({ code, introduce, managerId, name, pid }) => {
  return request.post('/company/department', { code, introduce, managerId, name, pid })
}
// 删除部门详情
export const delDepartmentRequest = (id) => {
  return request.delete(`/company/department/${id}`)
}
// 部门信息修改
export const updateDepartmentRequest = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}
// 获取单个部门信息
export const getDepartmentDetailRequest = (id) => {
  return request.get(`/company/department/${id}`)
}
